/**
 * $Id$
 * Copyright 2011-2014 Oak Pacific Interactive. All rights reserved.
 */
package com.malphi.framework.flash.result;


/**
 * @author <a href="mailto:ruofei.ma@renren-inc.com">ma ruofei</a>
 * @version 1.0 2011-11-29 下午02:55:09
 * @since 1.0
 */
public class ResultImpl<T extends Object> implements Result<T> {

    private T result;

    private int statusCode;

    public ResultImpl(T result, int statusCode) {
        this.result = result;
        this.statusCode = statusCode;
    }
    
    /* (non-Javadoc)
     * @see com.malphi.framework.flash.result.Result#getResult()
     */
    @Override
    public T getResult() {
        return result;
    }

    /* (non-Javadoc)
     * @see com.malphi.framework.flash.result.Result#getResultCode()
     */
    @Override
    public int getResultCode() {
        return statusCode;
    }

    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }

    public void setResult(T result) {
        this.result = result;
    }

}
